package edu.po.au.server.domain;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Index;
import javax.jdo.annotations.Indices;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Version;
import javax.jdo.annotations.VersionStrategy;


@PersistenceCapable(detachable="true")
@Version(strategy=VersionStrategy.VERSION_NUMBER, column="VERSION", 
				extensions={@Extension (vendorName="datanucleus", key="field-name", value="version")})
public class User implements Serializable {

	public final static String USER_ID = "userId";
	
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;
	
	@Persistent 
	private Long userId;

	@Persistent 
	private String fname;

	@Persistent 
	private String lname;

	@Persistent 
	private String mobileNo;

	@Persistent 
	private String email;

	@Persistent 
	private Long countryCode;

	@Persistent 
	private Long version;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getFname() {
		return fname;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	public String getLname() {
		return lname;
	}

	public void setLname(String lname) {
		this.lname = lname;
	}

	public String getMobileNo() {
		return mobileNo;
	}

	public void setMobileNo(String mobileNo) {
		this.mobileNo = mobileNo;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Long getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(Long countryCode) {
		this.countryCode = countryCode;
	}

	public User() {
		super();
	}

	public String toString() {
		return ("userId=[" + userId + "] firstname=[" + this.fname + "] lastname=["
										+ this.lname + "] mobileNo=[" + this.mobileNo + "] email=["
										+ this.email + "] countryCode=[" + this.countryCode + "]");
	}

}
